package com.rainsoft.center.isec.frame.factory.record;

import com.rainsoft.center.isec.frame.record.ARecordDataJob;
import com.rainsoft.center.isec.frame.start.PrepareSpark;

/**
 * @Package com.rainsoft.center.isec.frame.factory.record
 * @Description:
 * @Author elwyn
 * @Date 2017/12/13 22:01
 * @Email elonyong@163.com
 */
public abstract class RecordFactory{

    public static RecordFactory getRecordFactory(String recordClass) {
        RecordFactory recordFactory = null;
        try {
            recordFactory = (RecordFactory) Class.forName(recordClass).newInstance();
        } catch (InstantiationException | IllegalAccessException e) {
            e.printStackTrace();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
            System.out.println("没有找到" + recordClass + "处理类");
        }
        return recordFactory;
    }


    public  abstract   ARecordDataJob getRecordDataJob(Class clazz, PrepareSpark prepareSpark);


}
